<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../include.jsp" %>


<html>
<head>
	<script type="text/javascript">
		$(document).ready(function() {
			
			// 수정
			$("#id_btn_edit").click(function(e) {
				e.preventDefault();
				if (confirm("변경된 권한을 적용 하시겠습니까?")) {
					$("#user").submit();
				}
			});
			
			// 취소
			$("#id_btn_cancel").click(function(e) {
				e.preventDefault();
				history.back();
			});
			
		});
	</script>
</head>
<body>

	<h3>회원 권한 변경</h3>

	<form:form commandName="user" method="post">
	<form:hidden path="id" />
	
	<fieldset class="tbl_type3 tbl_forms">  
	    <table cellspacing="0" border="1" summary="표에 관한 요약 정보">  
	    <col width="100">  
	    <col>  
		
	    <tr>  
	    <th>권한정보</th>  
	    <td>
            <form:select path="roleGrpId">
            	<form:options items="${roleGrpCodeList}" itemLabel="name" itemValue="code" />
            </form:select>  
	    </td>  
	    </tr>  

	    <tr>  
	    <th>권한 변경일</th>  
	    <td><fmt:formatDate value="${user.roleEdtDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td> 
	    </tr>  

	    </table>  
	</fieldset>
	
	</form:form>



	
	<br>

	<fieldset class="tbl_type3 tbl_forms">  
	    <table cellspacing="0" border="1" summary="표에 관한 요약 정보">  
	    <col width="100">  
	    <col>  
		
	    <tr>  
	    <th>TEAM</th>  
	    <td>${user.userTeam.teamNm}</td>  
	    </tr>  
	
	    <tr>  
	    <th>아이디</th>  
	    <td>${user.id}</td>  
	    </tr>  

	    <tr>  
	    <th>이름</th>  
	    <td>${user.name}</td>  
	    </tr>  		

	    <tr>  
	    <th>닉네임</th>  
	    <td>${user.nickname}</td>  
	    </tr>
	
	    <tr>  
	    <th>이메일</th>  
	    <td>${user.email}</td>  
	    </tr>

	    </table>  
	</fieldset> 
	
	<br>

	<fieldset class="tbl_type3 tbl_forms">  
	    <table cellspacing="0" border="1" summary="표에 관한 요약 정보">  
	    <col width="100">  
	    <col>  
	
	    <tr>  
	    <th>가입일</th>  
	    <td><fmt:formatDate value="${user.regDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>  
	    </tr>

	    <tr>  
	    <th>최종수정일</th>  
	    <td><fmt:formatDate value="${user.lstEdtDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>  
	    </tr>

	    </table>  
	</fieldset> 


	<br><br>
	<div style="text-align:center;">
		<a href="#" id="id_btn_edit" class="btn_big"><strong>권한 변경</strong></a>
		<a href="#" id="id_btn_cancel" class="btn_big"><span>취소</span></a> 
	</div>	


</body>
</html>